package cn.wolfcode.luowowo.article.mapper;

import cn.wolfcode.luowowo.article.domain.Strategy;
import cn.wolfcode.luowowo.article.domain.StrategyDetail;
import cn.wolfcode.luowowo.article.query.StrategyDetailQuery;
import cn.wolfcode.luowowo.article.vo.StrategyStatisPersistenceVO;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface StrategyDetailMapper {
    int deleteByPrimaryKey(Long id);

    int insert(StrategyDetail record);

    StrategyDetail selectByPrimaryKey(Long id);

    List<StrategyDetail> selectAll();

    int updateByPrimaryKey(StrategyDetail record);

    List<StrategyDetail> selectForList(StrategyDetailQuery qo);

    void insertRelation(@Param("detailId") Long detailId, @Param("tagId") Long tagId);

    void deleteRelation(Long detailId);

    void updateStateById(@Param("state") int state, @Param("id") Long id);

    List<StrategyDetail> selectTopViewnum3ByDestId(Long destId);

    void updateStatisById(StrategyStatisPersistenceVO persistenceVO);

    List<StrategyDetail> selectStrategyByUserId(Long userId);

    void insertFavorRelation(@Param("sid") Long sid, @Param("userId") Long userId);

    void deleteFavorRelation(@Param("userId") Long userId, @Param("sid") Long sid);
}